package com.xwaf.platform.system.provider.nok;

import java.io.IOException;
import java.util.List;

import com.xwaf.platform.common.utils.JsonMapper;
import com.xwaf.platform.common.utils.vo.JsonUserVo;

public class JsonMapperTest {

	public static void main(String[] args) throws IOException {
		
//		String str = "{\"id\":\"1\",\"name\":\"测试\",\"age\":\"18\",\"sex\":\"1\"}";
//		System.out.println(JsonMapper.jsonToObj(JsonUserVo.class,str ).toString());

		String str = "[{\"id\":\"1\",\"name\":\"测试\",\"age\":\"18\",\"sex\":\"1\"}]";
		// List<Map> jsonList = JsonUtil.jsonToList(str, Map.class);
		List<JsonUserVo> jsonList = JsonMapper.jsonToList(str, JsonUserVo.class);
		System.out.println(jsonList);
		System.out.println(jsonList.size());
	}
}
